package com.dy.design_pattern_study.mediator_pattern.dome2.impl;

import com.dy.design_pattern_study.mediator_pattern.dome2.Country;
import com.dy.design_pattern_study.mediator_pattern.dome2.UnitedNations;
import lombok.Setter;

/**
 * @CreateBy zhangdingyi
 * @Date 2023-04-23
 * @Content
 */
public class UnitedNationsSecurityCouncil extends UnitedNations {
    @Setter
    private USA colleague1;
    @Setter
    private Iraq colleague2;

    //声明
    @Override
    public void declare(String message, Country colleague) {
        if (colleague.equals(colleague1)) {
            colleague2.getMessage(message);
        } else {
            colleague1.getMessage(message);
        }
    }
}
